package com.fitz.core.demo;

import com.fitz.core.context.RequestContext;
import com.fitz.core.filter.AbstractFilter;

/**
 * @author gousl01
 * @date 2021/3/15 16:07
 * @desc
 */
public class TestFilter extends AbstractFilter {

    @Override
    public String routeType() {
        return "pre";
    }

    @Override
    public int order() {
        return 0;
    }

    @Override
    public boolean shouldFilter() {
        return true;
    }

    @Override
    public Object run() {
        System.out.println("testFilter >>>>>>");
        RequestContext ctx = RequestContext.getCurrentContext();
        System.out.println("testFilter >>>>>>"+ctx.getRequest().getMethod());

        return null;
    }
}
